# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=libwapcaplet
pkgver=0.4.3
pkgrel=2
pkgdesc='String internment library with rapid string comparison'
arch=(loong64 x86_64)
url='https://www.netsurf-browser.org/projects/libwapcaplet/'
license=(MIT)
makedepends=(netsurf-buildsystem)
source=("https://download.netsurf-browser.org/libs/releases/$pkgname-$pkgver-src.tar.gz")
sha256sums=('9b2aa1dd6d6645f8e992b3697fdbd87f0c0e1da5721fa54ed29b484d13160c5c')

prepare() {
  sed -i 's:_BSD_SOURCE:_DEFAULT_SOURCE:;s:rns:rns -w:' \
    $pkgname-$pkgver/Makefile
}

build() {
  make -C $pkgname-$pkgver PREFIX=/usr COMPONENT_TYPE=lib-shared
}

package() {
  make -C $pkgname-$pkgver \
    INCLUDEDIR=include \
    LIBDIR=lib \
    PREFIX=/usr \
    DESTDIR="$pkgdir" \
    COMPONENT_TYPE=lib-shared \
    install
  install -Dm644 $pkgname-$pkgver/COPYING \
    "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

# vim: ts=2 sw=2 et:
